/*
 * Copyright 2017 The Kubernetes Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import "ansi_up";
@import "default-fonts";
@import "master-font-size";
@import "../../scss/components/Card/mixins";
@import "../../scss/components/Chart/colors";
@import "../../scss/components/Sidecar/mixins";

* {
  box-sizing: border-box;
}
::selection {
  background-color: var(--color-selection-background);
}
html,
body[kui-theme-style],
.page,
.main,
.kui--full-height,
.repl {
  height: 100%;
  flex: 1;
  max-height: 100%;
  overflow-x: hidden;
}
body[kui-theme-style] {
  font-weight: 400;
  margin: 0;
  overflow: hidden;

  /* see https://github.com/IBM/kui/issues/4414 */
  -webkit-font-smoothing: unset;
}
.kui--full-height,
.page {
  display: flex;
  flex-direction: column;
  user-select: text;
}
body[kui-theme-style] a.plain-anchor {
  color: inherit;
  text-decoration: none;
  transition: none;
}

/* HEADER */
.header {
  flex-basis: 0;
  display: flex;
  align-items: center;
  padding: 0 1.1875rem;
  font-weight: 300;
}

/* MAIN */
.main {
  display: flex;
  flex: 1;
}

/* REPL */
body.still-loading .repl {
  opacity: 0;
}
.scrollable[data-table-max-rows="4"],
.scrollable-auto[data-table-max-rows="4"] {
  max-height: calc(4 * 3em + 2px);
}
.scrollable[data-table-max-rows="5"],
.scrollable-auto[data-table-max-rows="5"] {
  max-height: calc(5 * 3em + 2px);
}
.scrollable[data-table-max-rows="6"],
.scrollable-auto[data-table-max-rows="6"] {
  max-height: calc(6 * 3em + 2px);
}
.scrollable[data-table-max-rows="7"],
.scrollable-auto[data-table-max-rows="7"] {
  max-height: calc(7 * 3em + 2px);
}
.scrollable[data-table-max-rows="8"],
.scrollable-auto[data-table-max-rows="8"] {
  max-height: calc(8 * 3em + 2px);
}
.scrollable[data-table-max-rows="9"],
.scrollable-auto[data-table-max-rows="9"] {
  max-height: calc(9 * 3em + 2px);
}
.scrollable[data-table-max-rows="10"],
.scrollable-auto[data-table-max-rows="10"] {
  max-height: calc(10 * 3em + 2px);
}

/* custom content */
.code-highlighting pre {
  font-family: var(--font-monospace);
  font-weight: 400;
  font-size: 0.875rem;
  white-space: pre-wrap;
  background: transparent;
}

/* generic */
.kui--float-left {
  float: left;
}
.kui--float-right {
  float: right;
}
.kui--invisible-overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
}
.kui--line-break:after {
  /* Use this to introduce a line break in a way that avoids capturing
   the line break in copy-paste. E.g. see
   https://github.com/IBM/kui/issues/7125 */
  content: "\A";
  white-space: pre;
}
.kui--ignore-if-empty {
  display: flex;
  flex: 1;
  &:empty {
    display: none;
  }
}
.kui--hero-text {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-size: 1.5rem;
  font-family: var(--font-sans-serif);
}
.flex-column {
  flex-direction: column;
}
.flex-fill {
  flex: 1;
  min-width: 0; /* so that reducing the width of the window causes a reflow; sigh */
}
.kui--rotate-90 {
  transform: rotate(90deg);
}
.kui--rotate-180 {
  transform: rotate(180deg);
}
.kui--rotate-270 {
  transform: rotate(270deg);
}
.kui--rotate-180-then-flip {
  transform: scaleY(-1);
}
.full-height {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: hidden;
}
.kui--relative-positioning {
  position: relative;
}
.kui--center-absolute {
  /* assumes parent is position: relative */
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
}
textarea.not-tabbable,
input.not-tabbable {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.map-key {
  color: var(--color-map-key);
}
.map-value {
  color: var(--color-map-value);
}
b {
  font-weight: bold;
}
webview {
  display: flex;
  flex: 1;
  background: transparent;
}
.blurry {
  filter: blur(3px) brightness(0.5) grayscale(0.5);
  -webkit-app-region: drag;
}
.blurry [data-balloon]:before,
.blurry [data-balloon]:after {
  /* no tooltips under a blurry element */
  display: none;
}
.no-padding {
  padding: 0;
}
.no-margin {
  margin: 0;
}
.present-as-quotation {
  padding: 0.375em 0;
  margin: 0.375em 0;
}
.do-not-overflow {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.overflow-auto {
  overflow: auto;
}
.display-inline {
  display: inline;
}
.display-inline-block {
  display: inline-block;
}
.fixed-table-layout {
  table-layout: fixed;
}
.text-center {
  text-align: center;
}
.text-right,
td.text-right,
th.text-right,
th.text-right > span {
  text-align: right !important;
}
pre,
code {
  font-family: var(--font-monospace);
}
code.fancy-code,
code.fancy-code.hljs {
  background: var(--color-base00) !important;
  border: 1px solid var(--color-ui-04);
  color: var(--color-base05);
}
.no-wrap {
  white-space: nowrap;
}
.normal-wrap {
  white-space: normal;
}
.break-all {
  word-break: break-all;
}
.hide {
  display: none !important;
}
.flex-layout {
  display: flex;
  align-items: center;
}
.flex-wrap {
  flex-wrap: wrap;
}
.as-column {
  display: grid;
}
.flex-layout.flex-align-stretch {
  align-items: stretch;
}
.flex-align-center {
  justify-content: center;
}
.flex-align-end {
  display: flex;
  justify-content: flex-end;
}
.inline-flex {
  display: inline-flex;
}
.flex-align-start {
  justify-content: flex-start;
}
.flex-align-top {
  align-items: flex-start;
}
.grid-layout {
  flex: 1;
  display: grid;
  grid-auto-rows: max-content;
  grid-gap: 0.125rem 0.875rem;
  grid-template-columns: repeat(auto-fill, minmax(10em, auto));
}
.grid-layout > div {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.normal-text {
  color: var(--color-text-01);
  font-weight: 400;
  opacity: 1;
  font-size: 0.875rem;
}
.normal-text svg path {
  fill: var(--color-text-01);
}
.even-larger-text {
  font-size: 2rem;
  line-height: 1rem;
}
.larger-text {
  font-size: 1.5rem;
}
.somewhat-larger-text {
  font-size: 1.125rem;
}
.even-smaller-text {
  font-size: 0.75rem;
}
.smaller-text {
  font-size: 0.875rem;
}
.semi-transparent {
  opacity: 0.8;
}
.somewhat-smaller-text {
  font-size: 0.925rem;
}
body[kui-theme-style] .sub-text {
  color: var(--color-text-02);
}
.strikethrough {
  text-decoration: line-through;
}
.underline {
  text-decoration: underline;
}
.italic {
  font-style: italic;
}
.lighter-text {
  font-weight: 300;
}
.even-lighter-text {
  color: var(--color-text-02);
  font-weight: 300;
}
.nowrap {
  white-space: nowrap;
}
.slightly-deemphasize {
  color: var(--color-text-02);
}
.deemphasize {
  color: var(--color-text-02);
  font-size: 0.75rem;
  opacity: 0.7;
  vertical-align: middle;
}
.deemphasize.deemphasize-partial {
  font-weight: 400;
  opacity: 1;
}
.pre-wrap {
  white-space: pre-wrap;
}
.monospace,
pre.monospace {
  font-family: var(--font-monospace);
}
.sans-serif {
  font-family: var(--font-sans-serif);
}
.semi-bold {
  font-weight: 500;
}
.sans-serif.semi-bold {
  font-weight: 600;
}
.min-width-6em {
  min-width: 6em !important;
}
.min-width-8em {
  min-width: 8em !important;
  display: block;
}
.min-width-10em {
  min-width: 10em !important;
  display: block;
}
.timestamp-like {
  width: 16em;
}
.not-very-wide {
  display: block; /* spans don't respond */
  max-width: 18em;
}
.not-too-wide {
  display: block; /* spans don't respond */
  max-width: 35em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge-width {
  width: 10em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.option-width {
  /* e.g. cells in tables that are presenting --options */
  width: 10em;
}
.pretty-narrow {
  /* please note: used in tandem with not-too-wide */
  width: 7em;
}
.very-narrow {
  /* please note: used in tandem with not-too-wide */
  width: 6em !important;
}
.a-few-numbers-wide {
  width: 5em;
}
.icon-width {
  /* intended for fontawesome table cells */
  width: 2em;
}
.double-icon-width {
  /* intended for fontawesome table cells */
  width: 4em;
}
.normal-size {
  color: var(--color-text-01);
  font-size: inherit;
  font-weight: inherit;
}
body {
  /** This group of rules override default user-agent stylings */
  ol,
  ul {
    &:not(.pf-c-wizard__nav-list):not(.pf-c-list) {
      margin: 0;
      padding-inline-start: 0;
      & > li {
        list-style-type: none;
      }
    }
  }
  button {
    background: none;
    font-family: var(--font-sans-serif);
    &:hover {
      cursor: pointer;
    }
  }

  .small-bottom-pad {
    margin-bottom: 1ex;
    display: inline-flex;
  }
  .all-pad {
    padding: 1em;
    padding-left: var(--input-padding-left);
    padding-right: var(--input-padding-left);
  }
  .tiny-top-pad {
    margin-top: 0.125em;
  }
  .small-top-pad {
    margin-top: 1ex;
  }
  .big-top-pad {
    margin-top: 2em;
  }
  .top-pad {
    margin-top: 1em;
  }
  .bottom-pad {
    margin-bottom: 1em;
  }
  .small-left-pad {
    margin-left: 1ex;
  }
  .left-pad {
    margin-left: 1em;
  }
  .tiny-right-pad {
    margin-right: 0.1875em;
  }
  .small-right-pad {
    margin-right: 0.375em;
  }
  .right-pad {
    margin-right: 1em;
  }
}
.repl .result-as-multi-table-flex-wrap .big-top-pad:not(:last-child) > div,
body.subwindow .result-as-multi-table-flex-wrap .big-top-pad:not(:last-child) > div {
  padding-right: 2em;
}
.emphasize {
  font-size: 1.5rem;
  font-weight: 900;
}
.count-with-label[data-is-plural="false"] .label-plural,
.count-with-label[data-is-plural="true"] .label-singular {
  display: none;
}
.clickable-color {
  color: var(--color-base09);
}
.clickable-blatant {
  text-decoration: underline;
  text-decoration-color: var(--color-text-02);
}
.clickable:hover,
.entity-name-group:not(.header-cell) .entity.actions:hover .entity-name {
  cursor: pointer;
  text-decoration: underline;
}
.clickable-block {
  cursor: pointer;
}
.clickable-block:hover {
  border-color: var(--color-ui-05) !important;
}
.graphical-clickable:hover {
  cursor: pointer;
}
.template {
  display: none;
}
.toggle-visibility-on-hover .visible-on-hover {
  transition-property: opacity;
  font-size: 70%;
  font-weight: 900;
  opacity: 0;
}
.toggle-visibility-on-hover:hover .visible-on-hover {
  opacity: 0.5;
}
.hideable {
  transition-property: all;
}
.hidden {
  opacity: 0;
  height: 0;
  flex: 0 0 0;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  min-height: 0; /* important for firefox */
}
.offscreen {
  position: absolute;
  top: -1000px;
  left: -1000px;
}
.not-displayed {
  display: none !important;
}
.scrollable.scrollable-auto {
  overflow-y: auto;
  overflow-x: hidden;
  &.scrollable-x {
    overflow-x: auto;
  }
}
.scrollable {
  overflow-y: scroll;
  overflow-x: hidden;
}
.scrollable-x {
  overflow-y: hidden;
  overflow-x: scroll;
}

/* delayed appearance animation */
.fade-in {
  animation: 1s fadeIn;
  animation-fill-mode: forwards;
}
@keyframes fadeIn {
  99% {
    visibility: hidden;
  }
  100% {
    visibility: visible;
  }
}

/* fade-in animation */
.fade-in2 {
  animation: 750ms fadeIn2;
  animation-fill-mode: forwards;
}
@keyframes fadeIn2 {
  0% {
    opacity: 0;
  }
  25% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* spin animation */
.kui--spin-animation {
  animation: spin 1s infinite;
}
@-moz-keyframes spin {
  100% {
    -moz-transform: rotate(360deg);
  }
}
@-webkit-keyframes spin {
  100% {
    -webkit-transform: rotate(360deg);
  }
}
@keyframes spin {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

/* used by bottom-stripe to flush-right buttons */
a.kui--tab-navigatable {
  /* remove the hyperlink underline */
  text-decoration: none;
}
a.kui--tab-navigatable:hover {
  color: inherit;
}

/* pulse animation for repl.partial */
input.repl-partial,
.alert-pulse {
  animation: alert-pulse 500ms 1;
  animation-direction: alternate;
}
@keyframes alert-pulse {
  0% {
    color: inherit;
  }
  50% {
    font-weight: bold;
    color: rgb(227, 26, 28);
    transform: scale(1.02);
  }
  100% {
    color: inherit;
  }
}
@keyframes selected-pulse {
  0% {
    color: inherit;
  }
  100% {
    color: var(--color-brand-03);
  }
}
@keyframes big-pulse {
  0% {
  }
  50% {
    filter: hue-rotate(-45deg);
  }
  100% {
    filter: hue-rotate(45deg);
    transform: scale(1.25);
  }
}

.pulse {
  animation: pulse 1000ms 1;
}
body {
  --animation-short-repeating-pulse: pulse 1000ms 3 alternate-reverse;
  --animation-medium-repeating-pulse: pulse 1000ms 6 alternate-reverse;
  --animation-long-repeating-pulse: pulse 1000ms 20 alternate-reverse;
  --animation-infinite-repeating-pulse: pulse 1000ms infinite alternate-reverse;
  --animation-repeating-pulse: var(--animation-infinite-repeating-pulse);
}
.repeating-pulse {
  animation: var(--animation-repeating-pulse);
}
@keyframes pulse {
  0% {
    opacity: 0.25;
  }
  100% {
    opacity: 1;
  }
}

/* restart needed warning */
body:not(.oops-total-catastrophe) #restart-needed-warning {
  display: none;
  opacity: 0;
}
#restart-needed-warning {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
#restart-needed-warning i {
  font-size: 12vw;
  color: var(--color-base08);
}
#restart-needed-warning .restart-needed-warning-content {
  color: var(--color-base06);
  font-size: 3vw;
  padding: 5vmin;
}
body.oops-total-catastrophe #restart-needed-warning {
  opacity: 1;
}

.wrap-normal {
  /* i want this element to line wrap normally */
  white-space: normal;
}

.capitalize {
  text-transform: capitalize;
}

/* markdown */
.page-content {
  flex: 1;
  white-space: normal;
}
@mixin CommentaryMargin {
  .page-content.padding-content:not(:empty) {
    /* these rules attempt to mimic github.com as of 20210115 */
    width: 100%;
  }
}
@include CardBody {
  /* we need to be careful to apply this rule only to the immediate
   children of CardBody, as there may be nested .page-content matches
   for which we do not want to apply CommentaryMargin */
  & > {
    @include CommentaryMargin;
  }
}
@include Sidecar {
  @include CommentaryMargin;
  .page-content.padding-content:not(:empty) {
    /* See https://github.com/kubernetes-sigs/kui/issues/7348 */
    padding: 0 2rem;
  }
  &[data-float] {
    background-color: var(--color-sidecar-background-01);
  }
}
.page-content hr {
  margin: 2.25em 0;
  border: 0.5px solid var(--color-content-divider);
}
.page-content blockquote {
  border-left: 0.25em solid var(--color-table-border1);
  padding: 0 1em;
  margin-bottom: 0.375em;

  &,
  p,
  code {
    font-size: calc(13em / 16);
  }

  &:empty {
    padding: 0;
    margin: 0;
  }
}
.page-content p {
  font-size: inherit;
}
.page-content code {
  font-family: var(--font-monospace);
}
@mixin CommentaryCode {
  .page-content p > code,
  .page-content li > code {
    @content;
  }
}
@mixin CommentaryCodeInInvertedColorContext {
  .kui--inverted-color-context {
    @include CommentaryCode {
      @content;
    }
  }
}
@mixin CommentaryCodeStandalone {
  .repl .page-content:not(.full-height) p > code,
  .repl .page-content:not(.full-height) li > code {
    @content;
  }
}
$commentary-code-bg-light: rgba(27, 31, 35, 0.05);
$commentary-code-bg-dark: rgba(227, 231, 235, 0.1);
.repl {
  @include CommentaryCode {
    word-break: break-all;

    /* mimic github styling here */
    background-color: $commentary-code-bg-light;
    padding: 0.2em 0.4em;
    font-size: calc(13em / 16);
    border-radius: 6px;
  }
}
body[kui-theme-style="dark"] .repl {
  @include CommentaryCode {
    background-color: $commentary-code-bg-dark;
  }
}
@include CommentaryCodeInInvertedColorContext {
  background-color: $commentary-code-bg-dark;
}
.kui .page-content code.kui--code--editor {
  display: block;
  padding: 1em;
  background-color: var(--color-sidecar-background-02);
}

.page-content pre > code {
  color: inherit;
}
.kui--sidecar .page-content p {
  & > code,
  & > a > code {
    color: var(--color-base0F);
  }
}
.clickable:not(:hover) .page-content p > code {
  color: var(--color-base0F);
}
$kui--page-content-h4-padding: 0.5em;
$kui--page-content-paragraph-padding: 0.375em;
.page-content .paragraph {
  padding: $kui--page-content-paragraph-padding 0;
}
.page-content img {
  max-width: 100%;
  object-position: left center;
  object-fit: contain;
  &[data-float] {
    padding-bottom: 0.5em;
  }
  &[data-float="left"] {
    padding-right: 1.25em;
  }
  &[data-float="right"] {
    padding-left: 1.25em;
  }
  &:not([data-float]) + img:not([data-float]) {
    margin-left: 0.25em;
  }
}

body[kui-theme-style] {
  font-family: var(--font-sans-serif);
  background-color: var(--color-ui-01);
  color: var(--color-text-01);
}

body[kui-theme-style] a {
  color: var(--color-brand-01);
}
/* body[kui-theme-style] a:hover:not(.plain-anchor) {
  color: var(--color-support-04);
} */

.header {
  background: var(--color-stripe-01);
  color: var(--color-ui-01);
}
.header .application-name .bx--global-header__title--current-page {
  color: var(--color-support-04);
}

badge,
[data-tag="badge"] {
  &.clickable:hover {
    /* no underline effect for icons (i) and badges */
    text-decoration: none;
  }
  &:only-child {
    /* we only need margins around badges if there is more than one badge */
    margin: 0;
  }
  &.badge-as-image {
    background-color: transparent;
  }
  &.badge-as-image img {
    width: 5rem;
    height: auto;
  }
  &.badge-as-fontawesome {
    padding: 0;
    font-size: 1.5rem;
    color: var(--color-name);
  }
  &.is-title-like,
  &.is-kind-like {
    background: var(--color-base0D);
  }
  &.clickable:not(.badge-as-fontawesome):hover {
    background: hsl(203, 43%, 25%);
    text-decoration: none;
    /*var(--color-ui-01);*/
  }
}

.repl-result-prefix,
badge:not(.badge-as-fontawesome):not(.badge-as-image) {
  font-family: var(--font-sans-serif);
}

.green-text,
.valid-response .kui--color-by-status {
  color: var(--color-ok);
}
.green-text svg path {
  fill: var(--color-ok);
}
.red-text,
.error .kui--color-by-status {
  color: var(--color-error);
}
.red-text svg path {
  fill: var(--color-error) !important;
}
.yellow-text {
  color: var(--color-support-03-darker);
}
.yellow-text svg path {
  fill: var(--color-support-03-darker);
}
.blue-text {
  color: var(--color-blue);
}
.processing-text {
  color: var(--color-processing) !important;
}
.processing-text > svg path {
  fill: var(--color-processing) !important;
}
.cyan-text {
  color: var(--color-cyan) !important;
}
.cyan-text > svg path {
  fill: var(--color-cyan) !important;
}
span[data-extra-decoration="application error"] {
  color: var(--color-red);
}

/* sidecar bottom stripe */
.clickable:not(.clickable-color):hover,
.entity.actions:hover .entity-name-group:not(.header-cell) .entity-name {
  color: var(--color-brand-01);
}

.log-lines .log-line .log-line-bar.is-waitTime,
.legend-icon.is-waitTime {
  background: var(--color-ui-05);
}
body[kui-theme-style="dark"] .log-lines .log-line .log-line-bar.is-waitTime,
body[kui-theme-style="dark"] .legend-icon.is-waitTime {
  opacity: 0.5;
}
.log-lines .log-line .log-line-bar.is-initTime.is-success-true,
.legend-icon.is-initTime {
  /*background: var(--color-support-04);*/
  background: repeating-linear-gradient(
    -45deg,
    var(--color-green),
    var(--color-green) 2px,
    var(--color-ui-02) 3px,
    var(--color-ui-02) 4px
  );
  filter: grayscale(0.5) saturate(0.75);
}
.log-lines .log-line .log-line-bar.is-initTime.is-success-false {
  /*background: var(--color-support-04);*/
  background: repeating-linear-gradient(to right, var(--color-red), var(--color-red) 4px, white 4px, white 8px);
}

.log-lines .log-line .log-line-bar.is-success-true,
.legend-icon.is-runTime {
  background: var(--color-support-02);
}
.log-lines .log-line .log-line-bar.is-success-false,
.legend-icon.is-success-false {
  background: var(--color-support-01);
}
.log-lines .log-line.log-line-root .log-line-bar {
  background: #f3f3f3;
  border-color: rgba(0, 0, 0, 0.5);
}
.log-lines .log-line .log-line-bar.log-line-bar-conductor {
  background: #666;
}
.log-lines .log-line .log-message {
  border-left-color: var(--color-text-01);
}
.log-lines-message-for-activations {
  font-family: var(--font-sans-serif);
}
.log-lines .log-line.logged-to-stderr .log-date {
  /* special display for messages of error log lines */
  color: var(--color-error);
}
.log-lines .log-line .log-message pre code {
  white-space: pre-wrap;
}

#restart-needed-warning {
  background-color: var(--color-stripe-01);
  /*var(--color-ui-01);*/
}

.page [data-balloon]:after {
  font-family: var(--font-sans-serif);
}

/* directory listing coloring */
.dir-listing-is-directory {
  color: var(--color-name);
}
.dir-listing-is-executable {
  color: var(--color-support-01);
}
.dir-listing-is-link {
  color: var(--color-base0E);
}

body[kui-theme-style="light"] {
  @include charts-light;
}

body[kui-theme-style="dark"] {
  @include charts-dark;
}

body {
  /* define theme bindings; mapping color names to the base16 scheme */
  --color-black: var(--color-ui-01);
  --color-red: var(--color-base08);
  --color-green: var(--color-base0B);
  --color-yellow: var(--color-base0A);
  --color-cyan: var(--color-base0C);
  --color-light-blue: var(--color-base0D);
  --color-blue: var(--color-base0D);
  --color-magenta: var(--color-base0E);
  --color-white: var(--color-base07);
  --color-light-gray: var(--color-base04);
  --color-dark-gray: var(--color-base03);
  --color-ui-01: var(--color-base00);
  --color-ui-02: var(--color-base01);
  --color-ui-03: var(--color-base03);
  --color-ui-04: var(--color-base02);
  --color-ui-05: var(--color-base04);
  --color-ui-06: var(--color-base02);

  --color-sidecar-header: var(--color-base03);
  --color-sidecar-background: var(--color-base01);
  --color-sidecar-background-01: var(--color-base01);
  --color-sidecar-background-02: var(--color-base03);

  /** Themes really should define these. But we can provide a rough approximation. */
  --color-light-red: rgba(var(--color-red-rgb), 0.9);
  --color-light-green: rgba(var(--color-red-green), 0.9);

  /* e.g. xterm ANSI colors; in case themes want a light yellow for
   badges, and a darker yellow for text */
  --color-yellow-text: var(--color-yellow);

  --color-table-border1: rgba(255, 255, 255, 0.5);
  --color-table-border2: rgba(255, 255, 255, 0.9);
  --color-table-border3: rgba(255, 255, 255, 0.3);

  --color-brand-01: var(--color-blue);
  --color-brand-02: var(--color-magenta);
  --color-brand-03: var(--color-cyan);

  --color-primary-button-background: var(--color-brand-03);
  --color-primary-button-border: none;
  --color-secondary-button-background: var(--color-base04);
  --color-secondary-button-border: none;
  --color-secondary-button-border-hover: none;
  --color-primary-button-background-hover: var(--color-primary-button-background);
  --color-secondary-button-background-hover: var(--color-secondary-button-background);

  --color-field-01: var(--color-base01);

  --color-text-against-dark-bg: var(--color-text-01);
  --color-support-01: var(--color-red);
  --color-support-02: var(--color-green);
  --color-support-03: var(--color-yellow);
  --color-support-03-darker: var(--color-yellow);
  --color-support-04: var(--color-base0C);

  /* stripes */
  --color-stripe-01: var(--color-base02);
  --color-stripe-02: var(--color-base03);

  --color-text-01: var(--color-base06);
  --color-text-02: var(--color-base04);

  --color-ok: var(--color-green);
  --color-error: var(--color-red);
  --color-warning: var(--color-base09);

  --color-scrollbar-thumb: var(--color-base04);
  --color-scrollbar-thumb-border: var(--color-base02);
  --color-scrollbar-thumb-outline: transparent;
  --color-scrollbar-track: transparent;

  --color-hover-primary-text: var(--color-cyan);
  --color-content-divider: var(--color-ui-03);

  --color-tag-beta-fill: var(--color-base05);
  --color-tag-beta-text: var(--color-base01);
  --color-tag-ibm-fill: var(--color-base0D);
  --color-tag-ibm-text: var(--color-base01);

  /* two-color charts; yellow versus cyan should be a pretty good default */
  --color-chart-0: var(--color-yellow);
  --color-chart-1: var(--color-cyan);

  /* map keys and values */
  --color-map-key: var(--color-base0C);
  --color-map-value: var(--color-text-01);

  /* entity names and kinds */
  --color-name: var(--color-base0C);

  /* "is processing" color */
  --color-processing: var(--color-ui-05);

  /* border-bottom for active tab */
  --active-tab-color: var(--color-brand-03);

  /* repl background */
  --color-repl-background: var(--color-ui-01);
  --color-repl-background-02: var(--color-base02);

  /* background of third view */
  --color-background-03: var(--color-ui-03);

  /* text selection */
  --color-selection-background-dark: rgba(255, 255, 255, 0.3);
  --color-selection-background-light: rgba(0, 0, 0, 0.3);
}
body[kui-theme-style="dark"],
body[kui-theme-style="light"] .kui--inverted-color-context {
  --color-selection-background: var(--color-selection-background-dark);
}
body[kui-theme-style="light"],
body[kui-theme-style="dark"] .kui--inverted-color-context {
  --color-selection-background: var(--color-selection-background-light);
}

.color-base08 {
  color: var(--color-base08);
  fill: currentColor;
}
.color-base09 {
  color: var(--color-base09);
  fill: currentColor;
}
.color-base0A {
  color: var(--color-base0A);
  fill: currentColor;
}
.color-base0B {
  color: var(--color-base0B);
  fill: currentColor;
}
.color-base0C {
  color: var(--color-base0C);
  fill: currentColor;
}
.color-base0D {
  color: var(--color-base0D);
  fill: currentColor;
}
.color-base0E {
  color: var(--color-base0E);
  fill: currentColor;
}
.color-base0F {
  color: var(--color-base0F);
  fill: currentColor;
}

.color-latency0 {
  background-color: var(--color-latency-0);
}
.color-latency1 {
  background-color: var(--color-latency-1);
}
.color-latency2 {
  background-color: var(--color-latency-2);
}
.color-latency3 {
  background-color: var(--color-latency-3);
}
.color-latency4 {
  background-color: var(--color-latency-4);
}
.color-latency5 {
  background-color: var(--color-latency-5);
}

@media all and (max-width: 1100px) {
  .log-lines .log-field.start-time-field {
    display: none;
  }
}

@import "grid";
